<template>
	<view :class="{'flex-flow':flexFlow}" class="chat-item">
		<view class="chat-head" @click="callFatherMethod()">
			<image :src="customData.avatar" mode="aspectFill"></image>
		</view>
		<view class="chat-imgs" :style="{width: customData.thumbnailWidth + 'px',height: (customData.thumbnailHeight>220?220:customData.thumbnailHeight) + 'px'}">
			<image @click="callFatherMethod2()" :src="customData.largeImageDownloadUrl" mode="aspectFill">
			</image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "chatImg",
		props:{
			flexFlow:{
				type:Boolean,
				default:true,
			},
			customData:{
				type:Object,
				default:{
					avatar:'',
					largeImageDownloadUrl:'',
					thumbnailWidth:0,
					thumbnailHeight:0,
					userId:0
				},
			}
		},
		data() {
			return {
			}
		},
		created() {
			
		},
		mounted() {
		},
		methods: {
			callFatherMethod(){
				this.$emit('callFatherMethod',this.customData.userId)
			},
			callFatherMethod2(status){
				this.$emit('callFatherMethod2',this.customData.largeImageDownloadUrl)
			}
		}
	};
</script>

<style lang="scss" scoped>

	
</style>